/**
 * <p>Title: WorkPlan.java</p>
 * <p>Description: </p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author 张小飞
 * @version 1.0
 * <pre>Histroy:
 *          2011-12-20 下午01:52:53  张小飞  Create
 *</pre>
 */
package com.baosight.sczx.common.zm.cInterface.ce;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.spring.SpringApplicationContext;
import com.baosight.iplat4j.dao.Dao;

/**
 * <p>Title: WorkPlan.java</p>
 * <p>Description: </p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author 张小飞
 * @version 1.0
 * <pre>Histroy:
 *          2011-12-20 下午01:52:53  张小飞  Create
 *</pre>
 */
public class WorkPlan {
	
	private static Dao dao = (Dao)SpringApplicationContext.getBean("dao");
	

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static EiBlock getWorkPlanBlock(String blockName, Map params){                                                              
		EiBlock block = new EiBlock(blockName);
		
		EiColumn eiColumn = new EiColumn("fdKeyId");
		eiColumn.setType("C");
		block.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdCode");
		eiColumn.setType("C");
		block.addMeta(eiColumn);

		List<Map> list = new ArrayList<Map>();
		list = dao.query("ZMCEWorkPlan.queryInterface", params);
		block.setRows(list);
		return block;
	}
}
